package com.ows.powercontrol.Listener;

import com.ows.powercontrol.Listener.socket.ServerslistenerT;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.net.Socket;

@Component
public class SererListener implements CommandLineRunner {
    @Value("${port}")
    private int port ;
    @Value("${host}")
    private String host;

    @Override
    public void run(String... args) throws Exception {
        new Thread(new ServerslistenerT(port,host)).start();
    }
}
